package com.superme.common.exceptions;

import com.superme.common.enums.ExceptionCodeEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * 描述: 登录异常
 * 作者: yanruizhi
 * 时间: 2023/7/4 16:25
 */

@Setter
@Getter
public class LoginException extends RuntimeException{
    private Integer code;
    private String msg;

    public LoginException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public LoginException(String msg) {
        super(msg);
        this.code = ExceptionCodeEnum.AUTHENTICATION_FAILED.getCode();
        this.msg = msg;
    }

}
